package br.edu.unilasalle.simon_api.dao.impl;

import java.util.List;

import javax.persistence.TypedQuery;

import org.springframework.stereotype.Repository;

import br.edu.unilasalle.simon_api.dao.IFormPagtoDao;
import br.edu.unilasalle.simon_api.domain.FormaPagamento;

@Repository
public class FormPagtoDao extends GenericDao<FormaPagamento, Long> implements IFormPagtoDao {
	
	public List<FormaPagamento> findAllAtivo() {
        StringBuilder str = new StringBuilder();
        str.append("select o from FormaPagamento o where o.ativo = 'S' order by o.id");
        TypedQuery<FormaPagamento> q = entityManager.createQuery(str.toString(), FormaPagamento.class);
		return q.getResultList();
    }
	
}
